hvm: hvm_io_assist() doesn't preoperly make use of its vcpu
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 4 Apr 2007 10:16:13 +0000 (11:16 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 4 Apr 2007 10:16:13 +0000 (11:16 +0100)
parameter. Remove it to make it obvious that it can only be called for
the currently-executing vcpu.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/io.c
xen/arch/x86/hvm/platform.c
xen/include/asm-x86/hvm/io.h

index 4af6b9e4da34ecd12704f6ad1a021f43adb27ac0..735f32fc3f3e49b0d7e8005f9bc80d2824a7147c 100644 (file)
@@ -131,7 +131,7 @@ void hvm_do_resume(struct vcpu *v)
         switch ( p->state )
         {
         case STATE_IORESP_READY: /* IORESP_READY -> NONE */
-            hvm_io_assist(v);
+            hvm_io_assist();
             break;
         case STATE_IOREQ_READY:  /* IOREQ_{READY,INPROCESS} -> IORESP_READY */
         case STATE_IOREQ_INPROCESS:
index 4bff30b2b9742d4cbc6aad213160f3157ecdc8a0..23d62b4d35193405aae4929f6e634825a55af581 100644 (file)
@@ -764,13 +764,14 @@ static void hvm_mmio_assist(struct cpu_user_regs *regs, ioreq_t *p,
     }
 }
 
-void hvm_io_assist(struct vcpu *v)
+void hvm_io_assist(void)
 {
     vcpu_iodata_t *vio;
     ioreq_t *p;
     struct cpu_user_regs *regs;
     struct hvm_io_op *io_opp;
     unsigned long gmfn;
+    struct vcpu *v = current;
     struct domain *d = v->domain;
 
     io_opp = &v->arch.hvm_vcpu.io_op;
index d8a751bd1d9eb185debbe8174792a457e0d6294d..0862da27531bd475a8759a60ef8bf172f5576835 100644 (file)
@@ -865,7 +865,7 @@ void send_pio_req(unsigned long port, unsigned long count, int size,
     if ( hvm_portio_intercept(p) )
     {
         p->state = STATE_IORESP_READY;
-        hvm_io_assist(v);
+        hvm_io_assist();
         return;
     }
 
@@ -914,7 +914,7 @@ static void send_mmio_req(unsigned char type, unsigned long gpa,
     if ( hvm_mmio_intercept(p) || hvm_buffered_io_intercept(p) )
     {
         p->state = STATE_IORESP_READY;
-        hvm_io_assist(v);
+        hvm_io_assist();
         return;
     }
 
index cf46b0cb6d6cf5057d06a1bf1b5b623e0d93d39d..c0663ccb0dc1eb947689be30e6900ba9cffb56e5 100644 (file)
@@ -149,7 +149,7 @@ extern void send_pio_req(unsigned long port, unsigned long count, int size,
 void send_timeoffset_req(unsigned long timeoff);
 extern void handle_mmio(unsigned long gpa);
 extern void hvm_interrupt_post(struct vcpu *v, int vector, int type);
-extern void hvm_io_assist(struct vcpu *v);
+extern void hvm_io_assist(void);
 
 #endif /* __ASM_X86_HVM_IO_H__ */